//
//  JGMouseEvent.h
//  JGGameController
//
//  Created by jagger.tu on 2024/12/25.
//

#import <Foundation/Foundation.h>
#import <JGVividEngine/JGControlEvent.h>

NS_ASSUME_NONNULL_BEGIN


typedef NS_ENUM(NSInteger,JGMouseButtonEventType) {
    JGMouseButtonEventTypeLeft = 0x01,
    JGMouseButtonEventTypeRight = 0x02,
    JGMouseButtonEventTypeMiddle = 0x03,
    JGMouseButtonEventTypeX1 = 0x04,
    JGMouseButtonEventTypeX2 = 0x05,
};

typedef NS_ENUM(NSInteger,JGMouseMoveMode) {
    JGMouseMoveModeDelta = 0x06,
    JGMouseMoveModeAbsolutely = 0x09,
};

@interface JGMouseButtonEvent : JGControlEvent

@property (nonatomic, assign) JGMouseButtonEventType type;
@property (nonatomic, assign) BOOL pressed;

- (instancetype)initWithType:(JGMouseButtonEventType)type isPressed:(BOOL)pressed;

@end

@interface JGMouseWheelScrollEvent : JGControlEvent

@property (nonatomic, assign) NSInteger value;

- (instancetype)initWithValue:(NSInteger)value;

@end

@interface JGMouseMoveEvent : JGControlEvent

///绝对坐标或相对坐标
@property (nonatomic, assign) JGMouseMoveMode mode;

///绝对坐标
@property (nonatomic, assign) NSInteger x;
///绝对坐标
@property (nonatomic, assign) NSInteger y;
///相对上次的偏移
@property (nonatomic, assign) NSInteger dx;
///相对上次的偏移
@property (nonatomic, assign) NSInteger dy;

@end

NS_ASSUME_NONNULL_END
